<%--
  Created by IntelliJ IDEA.
  User: xh
  Date: 2020/2/4
  Time: 14:56
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page isELIgnored="false"%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>欢迎登录 - 技术栈 - Java程序员成长平台</title>
    <meta name="keywords" content="">
    <meta name="description" content>
    <link rel="stylesheet" href="vendor/layui-v2.4.5/layui/css/layui.css">
    <link rel="stylesheet" href="css/common.css">
    <link rel="stylesheet" href="css/header.css">
    <link rel="stylesheet" href="css/footer.css">
    <link rel="stylesheet" href="css/login.css">

    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>


</head>
<body>
<div class="g-header">
    <div class="layui-main">
        <a href="/toIndex">
            <img src="img/logo.png" class="logo">
        </a>
        <ul class="layui-nav" lay-filter="">
            <li class="layui-nav-item item"><a href="/toRegister"><i class="layui-icon layui-icon-survey">&nbsp;还没有帐号，立即注册</i></a></li>
        </ul>
    </div>
</div>

<div class="layui-main g-main">
    <h1 class="text">欢迎登录</h1>
    <div class="layui-row layui-col-space30">
        <div class="layui-col-xs6 layui-col-xs-offset1 l-login-img">
            <a href="">
                <img src="img/login-img.png" width="570" height="360">
            </a>
        </div>
        <div class="layui-col-xs4 l-login-area">
            <div class="layui-tab layui-tab-brief l-login-tab" lay-filter="docDemoTabBrief">
                <ul class="layui-tab-title">
                    <li class="layui-this">微信登录</li>
                    <li>帐号登录</li>
                </ul>
                <div class="layui-tab-content">
                    <div class="layui-tab-item layui-show">
                        <img src="img/wx.png" width="322" height="322"/>
                    </div>
                    <div class="layui-tab-item">
                        <form class="layui-form" action="/doLogin" id="loginForm" method="post">
                            <div class="layui-form-item">
                                <input type="text" name="account" id="account" placeholder="手机号/邮箱/帐号" autofocus autocomplete="off" class="layui-input">
                            </div>
                            <div class="layui-form-item">
                                <input type="password" name="password" id="password" placeholder="密码" autocomplete="off" class="layui-input">
                            </div>
                            <div class="layui-row l-wrap">
                                <div class="layui-col-xs6">
                                    <div class="layui-form-item">
                                        <input type="checkbox" name="autoLogin" title="自动登录" lay-skin="primary">
                                    </div>
                                </div>
                                <div class="layui-col-xs6">
                                    <div class="l-forget-password">
                                        <a href="">忘记密码?</a>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <button class="layui-btn  layui-btn-fluid" onclick="login()" >登录</button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="g-footer layui-clear">
    <hr>
    <div>Copyright ©2018 技术栈(jishuzhan.club), All Rights Reserved.</div>
    <div>渝ICP备13001123号-2</div>
</div>

<script src="vendor/holder.min.js"></script>
<script src="vendor/layui-v2.4.5/layui/layui.js"></script>
<script src="js/common.js"></script>
<script src="js/login.js"></script>
<script src="jquery/jquery-2.1.1.min.js"></script>
<script>


//    $(function(){
//        alert("jquery是能用的！");
//    });

    function login() {
        var loginAccount=$("#account");
        var loginPassword=$("#password");


        if ( loginAccount === "" ) {
            layer.msg("账号不能为空！", {time:3000, icon:5, shift:6}, function(){
            });

        }

        if ( loginPassword==="" ) {

            layer.msg("密码不能为空！", {time:3000, icon:5, shift:6}, function(){
            });

        }

        $("#loginForm").submit();
    }
</script>
</body>
</html>